﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DnD.Core.Campaign;

namespace DnD.UI.Panels
{
    public partial class ShortPlayerInformation : BasePanel
    {
        public ShortPlayerInformation()
        {
            InitializeComponent();
        }
        public void LoadData(Player p)
        {
            playerName.Text = p.Name;
            foreach (Character c in p.Characters)
            {
                ShortCharacterInformation sci = new ShortCharacterInformation();
                sci.LoadData(c);
                characterPanel.Controls.Add(sci);
            }
        }
        public new void RestackChildControls()
        {
            Stacker.ReStack(characterPanel, 200, 3);
            Height = playerName.Height + characterPanel.Height;
        }
    }
}
